<extend name="Template:index"/>
<block name="title">
	项目详情
</block>

<block name="resource">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/home/css/project.css">
</block>
<block name="nav-pos">
  <span class="glyphicon glyphicon-home"></span>
  <li>您当前所在位置 ：</li>
  <li><a href="{:U('Index/index')}">首页</a></li>
  <li><a href="{:U('Project/index')}">项目中心</a></li>
  <li>项目详情</li>
</block>
<block name="main">

  <div id="project">
    <div class="project">
      
      <div class="clear"></div>
      <div class="release">
        <ul class="nav nav-pills">
          <li role="presentation" class="presentation"><a href="{:U('project/index')}">返回项目列表</a></li>
        </ul>
      </div>
      <div class="clear"></div>
      <div class="details">
        <div class="title"><h3>{$project.pro_name}</h3></div>
          <div class="content">
            <label for="name" class="col-sm-1 control-label">项目详情：</label>
            <p>{$project.pro_content}</p>

          </div>
          <div class="budget">
            <label for="name" class="col-sm-1 control-label">项目预算：</label>
            <span>{$project.pro_budget}</span><span>元</span>
          </div>
          <div class="information"><a href="{:U('project/publisher')}?id={$project.user_id}">发布人信息</a> </div>

<!--personalCenter/systemMessage-->
		<if condition="$project['pro_state'] eq 0">
          <div class="form-group btn-css btn-style">
            <div class="col-sm-10">
              <input class="btn btn-default btn-submit" id="btn" type="button" value="申请">
            </div>
          </div>
		<else />
		  <div class="form-group btn-css btn-style">
            <div class="col-sm-10">
              <input class="btn" id="btn" type="button" value="该项目已经完成" disabled="disabled">
            </div>
          </div>
		</if>

      </div>
    </div>
  </div>
  <div class="clear"></div>
  <script>
      $('#btn').click(function (){
          $.ajax({
              async: true,
              type: "post",
              url: "{:U('project/ajax')}",
              data:{pro_applicant:"{$session.id}",pro_id:"{$get.id}"},
              success:function btn(val){
                  alert(val);
              }
          })
      });
  </script>
</block>